<?php
namespace App\Http\Service\Admin;


use App\Http\Service\Basic\BasicService;
use Config;

class AdminService extends BasicService
{

    //构造函数
    function __construct()
    {
        parent::__construct();
    }


    //账户管理
    public function getAdminList($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.getAdminList'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.admin_list'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    // 批量添加
    public function doAdminUpdate($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.adminupdate'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.admin_update'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    /**
     * 管理员信息删除
     */
    public function doAdminDelete($where)
    {
//                dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.admin_delete'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.admin_delete'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }


    public function doAdminAdd($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.admin_add'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.admin_add'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

    public function getOpLogList($where)
    {
//        dd(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.op_log_list'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
        return $this->curlLogic->callWebServer(Config::get('custom.setting.BASE_API_PATH') . Config::get('custom.api.op_log_list'), json_encode($where,JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), 'post');
    }

}